package service.facade.customer;

import domain.Comment;
import domain.shop.*;

import java.util.List;
import java.util.Set;

public interface ShopCustomerService {


    void saveComment(Comment comment) throws Exception;


    List<Comment> findCommentsByProductId(Long Id);


    void updateBasketItem(BasketItem basketItem);


    void addProductToBasket(Product product, Integer count);


    void addProductToBasket(Long productID, Integer count);


    void removeProductFromBasket(Product product);


    void createNewOrder() throws Exception;

    void sendWizardOrderMail(String mail) throws Exception;

    Product findProductById(Long productId);//        BigDecimal tmp;
    //        for (BasketItem bi : order.getProducts()) {
    //            tmp = new BigDecimal(
    //                    String.valueOf(bi.getPrice() * bi.getMultiplicity()));
    //
    //            tmp = tmp.setScale(2, RoundingMode.HALF_UP);
    //            bd = bd.add(tmp);
    //            bd = bd.setScale(2, RoundingMode.HALF_UP);
    //        }
    //        order.setTotalPrice(bd);
    //    }


    Category findCategoryById(Long Id);


    List<Product> findAllProducts();


    PayMethod findPayMethodById(Long Id);


    DeliveryMethod findDeliveryMethodById(Long Id);


    List<DeliveryMethod> findAllDeliveryMethods();


    List<PayMethod> findAllPayMethods();


    List<Category> findCategoryRoots();


    List<Category> findCategoryChildsByParentId(Long Id);


    Set<Product> findRelatedProductsByProductId(Long productId);

    /**
     * Return top favourite products
     *
     * @param amount Numer of returning products
     * @return
     */
    List<Product> findTopFavouriteProducts(int amount);


    List<String> getAllVehicleTypes();


    List<Product> getAllProductsByVehicleType(String vehicle);

    List<Product> searchProducts(String fulltextQuery);

}
